package com.example.compilesodemo;

import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {
    private static final String TAG = MainActivity.class.getName();

    {
        System.loadLibrary("serial_port");
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
    }

    private void initView() {
        TextView textView =  ((TextView)findViewById(R.id.tv_test));
        textView.setText(sayHello());
        Log.d(TAG,"-----传入的数据为：------"+ textView.getText().toString());
    }

    public native String sayHello();
}